<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
  <head>
    <title>即将到期列表</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<link href="../../vendors/iconfonts/mdi/css/materialdesignicons.min.css" type="text/css" rel="stylesheet"/>
	<link href="../../vendors/css/vendor.bundle.base.css" type="text/css" rel="stylesheet"/>
	<link href="../../css/style.css" type="text/css" rel="stylesheet"/>
	<link href="../../node_modules/jqvmap/dist/jqvmap.min.css" type="text/css" rel="stylesheet"/>

	<script src="../../vendors/js/vendor.bundle.base.js"></script>
	<script src="../../vendors/js/vendor.bundle.addons.js"></script>
    <script src="../..vendors/js/Calendar.js"></script>
	<script src="../../js/off-canvas.js"></script>
	<script src="../../js/misc.js"></script>

	</head>

	<body>


    <section>

    <div id="u19955" class="ax_default" data-left="39" data-top="19" data-width="167" data-height="16">

          <!-- Unnamed (Rectangle) -->
          <div id="u19956" class="ax_default label">
            <div id="u19956_div" class="">

            </div>

            <div id="u19956_text" class="text ">

              <p class="col-sm-6 col-md-4 col-lg-3">
                <i class="mdi mdi-home"></i>
             <span style="text-decoration:none;color:#333333;">首页/催收管理</span><span style="text-decoration:none;">/即将到期列表</span></p>
            </div>
          </div>
    </div>

	
	<div class="box" >
	       <div class="card-body" style="padding-top: 7px;">

                  <form id="MyForm"  class="form-inline" method="post" >
                      <input id="currentPageNo" type="hidden" name="currentPageNo" value="1"/>
                      <input  class="form-control mb-2 mr-sm-2" type="text" name="userName" th:value="${userName}" placeholder="姓名"/>
                      <input  class="form-control mb-2 mr-sm-2" type="text" name="phoneNumber" th:value="${phoneNumber}" placeholder="手机号"/>
                      <input  class="form-control mb-2 mr-sm-2" type="text" name="loanId" th:value="${loanId}" placeholder="借款编号"/>
                      <input  class="form-control mb-2 mr-sm-2" type="text" name="ContractId"  th:value="${ContractId}" placeholder="合同号"/>
                      <button id="submit"  type="button" class="btn btn-gradient-primary btn-sm" style="margin: -3px 20px 0px 10px  ">查询</button>
                      <button type="button"  class="btn btn-gradient-primary btn-sm" style="margin: -3px 20px 0px 10px  " onclick="method5('tableExcel')">导出</button>
<!--
                      <button type="button" class="btn btn-outline-secondary btn-sm" style="margin-top: -3px">高级查询</button>
-->
                  </form>
           </div>
    </div>

    <div class="box2">

            <p style="font-size:18px;"><span style="font-family:'FontAwesome';font-weight:400;text-decoration:none;"></span><span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:12px;text-decoration:none;"> </span><span style="font-family:'微软雅黑';font-weight:400;font-size:12px;text-decoration:none;">数据列表</span></p>
    </div>
	
	<div id="u19876" class="ax_default _默认样式">
        <div id="u19876_div" class="">

        </div>
        <div id="u19876_text" class="text " style="display:none; visibility: hidden">
          <p></p>
        </div>
    </div>
	<div class="col-lg-12 stretch-card">
              <div class="card">
                <div class="card-body" style="padding-top: 0px">
                  
                  <table class="table table-bordered" >
                    <thead>
                      <tr>
					  
                    <!--   <th>

                        <input type="checkbox"  />
                        全选


                        </th>-->
                          <th>
                              借款编号
                          </th>
                          <th>
                              姓名
                          </th>
                          <th>
                              合同号
                          </th>
                          <th>
                              当前期次
                          </th>
                          <th>
                              应收本金
                          </th>
                          <th>
                              应收利息
                          </th>
                          <th>
                              借款管理费
                          </th>
                          <th>
                              贷款类型
                          </th>
                          <th>
                              本期还款日
                          </th>
                          <th>
                              提醒次数
                          </th>
                          <th>
                              状态
                          </th>
                          <th>
                              操作
                          </th>
                      </tr>
                    </thead>
                    <tbody >
                    <tr th:each="ue:${qryAllPageList}">




<!--
                     <td> <input type="checkbox"  /></td>
-->
<!--
                         <input type="hidden" th:attr="id=${user.userId }+'_userId'" th:value="${user.userId}"/>
-->

                         <td th:text="${ue.loan_id}"></td>
                         <td th:text="${ue.userName}"></td>
                         <td th:text="${ue.contractId}"></td>
                         <td th:text="${ue.currentperiod}"></td>
                         <td th:text="${ue.principalReceivable}"></td>
                         <td th:text="${ue.interestReceivable}"></td>
                         <td th:text="${ue.loanManagemenFee}"></td>
                         <td th:text="${ue.loanType}"></td>
                         <td th:text="${ue.currentRepaymentDate}"></td>
                         <td th:text="${ue.uer.remindNumber}"></td>
                         <td th:text="${ue.repaymentStatus}"></td>
                      <!--  <td >
                            <span><a href="javascript:;" class="userDel" th:onclick="'del(this)'" th:attr="userid=${user.userId }">
                            删除</a></span>
                        </td>-->
                        <td><button id="upcoming"  type="button" class="btn btn-gradient-primary btn-sm" style="margin: -3px 20px 0px 10px  ">到期提醒</button></td>

                    </tr>
                    </tbody>
                  </table>
                </div>
              </div>
    </div>

    <div class="page-bar">
        <ul class="page-num-ul clearfix">
            <li>共<span th:text="${page.totalCount }"></span>条记录&nbsp;&nbsp; <span th:text="${page.pageIndex}"></span>/<span th:text="${page.totalPageCount}"></span> 页</li>
            <button th:onclick="'javascript:pageQry(document.forms[0],1)'" th:if="${page.pageIndex gt 1 }">首页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex - 1}+')'"  th:if="${page.pageIndex gt 1 }">上一页</button>

            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex + 1}+')'" th:if="${page.pageIndex lt page.totalPageCount}">下一页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.totalPageCount}+')'" th:if="${page.pageIndex lt page.totalPageCount}">最后一页</button>
            &nbsp;&nbsp;
        </ul>
        <span class="page-go-form"><label>跳转至</label>
             <input type="hidden" id="totalPageCount" th:value="${page.totalPageCount}"/>
             <input type="text" name="inputPage" id="inputPage" class="page-key"/>页
             <button type="button" class="page-btn"
                     th:onClick="'jumpPage(document.forms[0],document.getElementById(\''+inputPage+'\').value)'">GO</button>
		</span>
    </div>

    <script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../../layer/layer.js"></script>

    <script type="text/javascript">
        var idTmr;
        function  getExplorer() {
            var explorer = window.navigator.userAgent ;
            //ie
            if (explorer.indexOf("MSIE") >= 0) {
                return 'ie';
            }
            //firefox
            else if (explorer.indexOf("Firefox") >= 0) {
                return 'Firefox';
            }
            //Chrome
            else if(explorer.indexOf("Chrome") >= 0){
                return 'Chrome';
            }
            //Opera
            else if(explorer.indexOf("Opera") >= 0){
                return 'Opera';
            }
            //Safari
            else if(explorer.indexOf("Safari") >= 0){
                return 'Safari';
            }
        }
        function method5(tableid) {
            if(getExplorer()=='ie')
            {
                var curTbl = document.getElementById(tableid);
                var oXL = new ActiveXObject("Excel.Application");
                var oWB = oXL.Workbooks.Add();
                var xlsheet = oWB.Worksheets(1);
                var sel = document.body.createTextRange();
                sel.moveToElementText(curTbl);
                sel.select();
                sel.execCommand("Copy");
                xlsheet.Paste();
                oXL.Visible = true;

                try {
                    var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
                } catch (e) {
                    print("Nested catch caught " + e);
                } finally {
                    oWB.SaveAs(fname);
                    oWB.Close(savechanges = false);
                    oXL.Quit();
                    oXL = null;
                    idTmr = window.setInterval("Cleanup();", 1);
                }

            }
            else
            {
                tableToExcel(tableid)
            }
        }
        function Cleanup() {
            window.clearInterval(idTmr);
            CollectGarbage();
        }
        var tableToExcel = (function() {
            var uri = 'data:application/vnd.ms-excel;base64,',
                template = '<html><head><meta charset="UTF-8"/></head><body><table>{table}</table></body></html>',
                base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) },
                format = function(s, c) {
                    return s.replace(/{(\w+)}/g,
                        function(m, p) { return c[p]; }) }
            return function(table, name) {
                if (!table.nodeType) table = document.getElementById(table)
                var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
                window.location.href = uri + base64(format(template, ctx))
            }
        })();


        //01.分页查询
        function pageQry(form, pageIndex) {

            $.ajax({
                type:"post",
                url:"/yz/qryPageAll?currentPageNo="+pageIndex+"",
                data:"page=1",
                success: function(){
                    window.location.href="/yz/qryPageAll?currentPageNo="+pageIndex;

/*
                    $("#Conframe").load("/yz/qryPageAll?currentPageNo="+pageIndex+"");
*/


                },
                error:function () {
                    alert("错误");


                }
            })

        }

        //02.跳转页查询
        function jumpPage(form, jumpPageIndex) {
            //01.数字校验
            var reg = /^[1-9]\d{0,}$/;
            if (!reg.test(parseInt(jumpPageIndex))) {
                alert("请输入合法的数字");
                return;
            }
            //02.范围校验：当前页不能大于总页数
            if (jumpPageIndex > document.getElementById("totalPageCount").value) {
                alert("已经是最后一页!");
                return;
            }
            $.ajax({
                type:"post",
                url:"/yz/qryPageAll?currentPageNo="+jumpPageIndex+"",
                data:"page=1",
                success: function(){
                    window.location.href="/yz/qryPageAll?currentPageNo="+jumpPageIndex;
/*
                    $("#Conframe").load("/yz/qryPageAll?currentPageNo="+jumpPageIndex+"");
*/


                },
                error:function () {
                    alert("错误");


                }
            })
        }




        //删除用户
      /*  function del(ele) {
            var $ele = $(ele);
            var userId = $ele.attr('userId');
            $.ajax({
                url: '//delBlackUser/'+userId+"",
                type: 'get'
                data: "",
                dataType: 'json',
                success: function (data) {
                    alert("删除成功");

                    if (data.success) {

                        //页面删除行
                        $("#" + userId + "_row").remove();
                    } else {

                        alert("删除失败");
                    }
                }

            });
        }*/
        //查询
        $("#submit").click(function () {
            alert($("#MyForm").serialize());
            $.ajax({
                type: "post",
                dataType: "text",
                url: "/yz/qryPageAll?currentPageNo=1",
                data:$("#MyForm").serialize(),
                success: function (data) {
                    alert($("#MyForm").serialize());
                    window.location.href="/yz/qryPageAll?"+$("#MyForm").serialize();
                  /*  $("#Conframe").load("/yz/qryPageAll?"+$("#MyForm").serialize()+"");*/

                },
                error: function () {
                    alert("错误");


                }


            });
        })





    </script>
    </section>
    </body>
</html>